#include "clueCardGroup.h"
#include "jsonUtils.h"

ClueCardGroup::ClueCardGroup() : id(0)
{

}

ClueCardGroup::ClueCardGroup(const ClueCardGroup& other) : id(other.id),name(other.name),scenes(other.scenes)
{
}

void ClueCardGroup::fromJson(const JsonValue& value)
{
	JsonUtils::loadLong(value, L"id", id);
	JsonUtils::loadStr(value, L"name", name);
	JsonUtils::loadIntArr(value, L"scenes", scenes);
}

void ClueCardGroup::toJson(JsonValue& value, JsonDoc::AllocatorType& allocator) const
{
	value.AddMember(L"id", id, allocator);
	JsonUtils::addString(value, L"name", name, allocator);
	JsonUtils::addIntArr(value, L"scenes", scenes, allocator);
}

const String& ClueCardGroup::getName() const
{
	return name;
}

const int64_t& ClueCardGroup::getId() const
{
	return id;
}

void ClueCardGroup::setId(const int64_t& id)
{
	this->id = id;
}
